﻿Option Explicit On
Imports System

Imports System.Data.Common

Namespace StrategyMappingDSTableAdapters

    Partial Public Class StrategyMappingTableAdapter

        Inherits System.ComponentModel.Component

        Public Function GetDataByFilter(ByVal dataTable As StrategyMappingDS.StrategyMappingDataTable, ByVal SQLExpression As String) As Integer
            Dim text1 As String
            text1 = Me.CommandCollection(0).CommandText
            Try
                Me.CommandCollection(0).CommandText += SQLExpression
                Return Me.Fill(dataTable)
            Catch ex As Exception
                text1 = ex.Message
            Finally
                Me.CommandCollection(0).CommandText = text1
            End Try
        End Function

        Public Function GetDataToImport(ByVal dataTable As StrategyMappingDS.StrategyMappingDataTable, ByVal SQLExpression As String) As Integer
            Dim text1 As String
            text1 = Me.CommandCollection(0).CommandText
            Try
                Me.CommandCollection(0).CommandText += SQLExpression
                Return Me.FillByImport(dataTable)
            Catch ex As Exception
                text1 = ex.Message
            Finally
                Me.CommandCollection(0).CommandText = text1
            End Try
        End Function


    End Class
End Namespace
